//
//  AdMoreDrawAd.h
//  AdMoreSDK
//
//  Created by Hayder on 2023/5/17.
//

#import "AdMoreBaseAd.h"

NS_ASSUME_NONNULL_BEGIN

@class AdMoreDrawAd;
@protocol AdMoreDrawAdDelegate <NSObject>

@optional
/**广告渲染成功*/
- (void)drawAdViewRenderSuccess:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;
/**广告渲染失败*/
- (void)drawAdViewFailedToRender:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd error:(NSError *)error;

/**展示成功**/
- (void)drawAdViewWillExpose:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;
/**广告点击事件**/
- (void)drawAdViewDidClick:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;
/**广告关闭事件*/
- (void)drawAdViewDidClose:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;

/**视频完成播放**/
- (void)drawAdViewPlayerStopPlaying:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;
/**视频播放，可能回调多次，暂停->继续播放也会回调**/
- (void)drawAdViewVideoStartPlaying:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;
/**视频暂停播放**/
- (void)drawAdViewVideoDidPause:(UIView *)drawAdView drawAd:(AdMoreDrawAd *)drawAd;

@end


@interface AdMoreDrawAd : AdMoreBaseAd

@property (nonatomic, weak) id<AdMoreDrawAdDelegate> delegate;

- (instancetype)initWithPlatformAd:(id)platformAd rootController:(UIViewController *)rootViewController;

- (UIView *)renderContentView;

@end

NS_ASSUME_NONNULL_END
